package com.lambkit.module.cms.core.layer;

import java.util.List;

import com.google.common.collect.Lists;

/**
 * 树结构信息,用于layui
 * @author yangyong
 *
 */
public class MenuTree {
	
	private String id;
	private String name;
	private String title;
	private String href;
	private String type;
	private int order;
	private Object model;
	private boolean spread = false;
	private boolean checked = false;
	private boolean disabled = false;
	private List<MenuTree> children;
	
	public void addChildren(MenuTree menu) {
		if(menu==null) return;
		if(children==null) {
			children = Lists.newArrayList();
		}
		children.add(menu);
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public List<MenuTree> getChildren() {
		return children;
	}

	public void setChildren(List<MenuTree> children) {
		this.children = children;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public Object getModel() {
		return model;
	}

	public void setModel(Object model) {
		this.model = model;
	}

	public boolean isSpread() {
		return spread;
	}

	public void setSpread(boolean spread) {
		this.spread = spread;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

}
